#include <map>
#include "CoCoA/library.H"
using namespace CoCoA;
using namespace std;


map<size_t, SparsePolyRing> __cocoa_rings; // all CoCoA polynomial rings


//! Create a CoCoA PolyRing from with ring id myring
SparsePolyRing CreatePolyRing(size_t myring){
		map<size_t, SparsePolyRing>::iterator pos=__cocoa_rings.find(myring);
		if (pos != __cocoa_rings.end()){
			return pos->second;
		}
		else
		{
			SparsePolyRing R = NewPolyRing(RingQ(),symbols("x"));
			__cocoa_rings.insert( make_pair(myring, R) );
			return R;
		}
}


CoCoA::GlobalManager CoCoAinitialization; // initialize a CoCoA::GlobalManager

int main(){

	SparsePolyRing T = NewPolyRing(RingQ(),symbols("y"));
	// __cocoa_rings.insert( make_pair(2, T) );

	
	// SparsePolyRing R = CreatePolyRing(1); // SEGV

	return 0;
}
